<template>
   <div class="box">
      <div class="header">
        <van-nav-bar title="我的京东" @click-left="$router.back()">
        <!-- 左箭头 -->
        <template #left>
          <van-icon name="arrow-left" size="18" color="black" />
        </template>
        <!-- 右图标 -->
        <template #right>
          <van-popover v-model="showPopover" theme="dark" trigger="click" :actions="actions" placement="bottom-end"
            @select="onselect">
            <template #reference>
              <van-icon name="ellipsis" size="18" color="black" />
            </template>
          </van-popover>
        </template>
      </van-nav-bar>

      </div>
      <div class="main">
        
      </div>
    </div>
  </template>
  
  <script>
  
  export default {
    data() {
    return {
      // 头部导航
      showPopover: false,
      actions: [
        { text: '首页', icon: "wap-home-o" },
        { text: '购物车', icon: "cart-o" }],
      // 侧边导航分类
      categoryList: [],
      activeKey: '',
    }
  },
  methods: {
    // 导航右图下拉选项
    onselect(action, index) {
      switch (index) {
        case 0:
          this.$router.push('/home')
          break;
        case 1:
          this.$router.push('/cart')
          break;
        default:
          break;
      }
    },
  },
  }
  </script>
  